package com.ymatou.business;

import com.android.uiautomator.core.UiCollection;
import com.android.uiautomator.core.UiObject;
import com.android.uiautomator.core.UiObjectNotFoundException;
import com.android.uiautomator.core.UiSelector;
import com.android.uiautomator.testrunner.UiAutomatorTestCase;
import com.ymatou.search.SearchResultPageTest;
import com.ymatou.util.Logger;

@SuppressWarnings("all")
public class ProductCardListTest extends UiAutomatorTestCase{
	
	private static final String TAG = ProductCardListTest.class.getSimpleName(); 
	
public void testCheckProductCardElement(UiSelector selector) throws UiObjectNotFoundException, InterruptedException {
		
		UiCollection collection = new UiCollection(selector);
		UiSelector childPattern = new UiSelector().className("android.widget.TextView");
		int count = collection.getChildCount(childPattern);
		
		for (int i = 0; i < count; i++) {
			UiObject object = collection.getChildByInstance(childPattern, i);
			Logger.log(TAG, object.getText());
		}
	}
}
